// PropertyFactory.h: interface for the PropertyFactory class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_PROPERTYFACTORY_H__63288D43_1488_4830_A361_72FA826E71DC__INCLUDED_)
#define AFX_PROPERTYFACTORY_H__63288D43_1488_4830_A361_72FA826E71DC__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "map.h"
#include "PropertyStack.h"
#include "OriginalProperty.h"

namespace PropertySystem
{
	class OriginalPropertySet;
	class AFX_EXT_CLASS PropertyFactory  
	{
	public:
		static const CString PARTIDPRONAME;
		static const CString DESCRIPTION;
		static const CString STANDARD;
		static const CString SPEC;
	private:
		PropertyFactory();

	public:
		virtual ~PropertyFactory();
	
	public:
		static PropertyFactory& Instance();

	public:
		PropertyStack& GetProperty(const CString& strPartID, const CString& strStandard);
		void UpdatePropertyStack();

	private:
		PropertyStack* FindPropertyStack(const CString& strKey);
		void AddPropertyStack(const CString& strKey, PropertyStack* pStack);
		PropertyStack* NewPropertyStack(const CString& strPartID, const CString& strStandard);
		PropertyVariable* GenerateVariable(const OriginalProperty* pOProperty);
		void RemoveAll();
		BOOL GetOPropertySet(OriginalPropertySet& OPropertySet, const CString& strPartID, const CString& strStandard);
		void GeneratorInhenceProperty(PropertyStack* pStack, const CString& strName, const CString& strValue);

	private:
		CMap<CString, CString, PropertyStack*, PropertyStack*> m_thePropertyTemplate;

	};
};
#endif // !defined(AFX_PROPERTYFACTORY_H__63288D43_1488_4830_A361_72FA826E71DC__INCLUDED_)
